package com.megagoodsoftware.smugmug.exceptions;

public class SmugMugFailedResponseFactory {
	private SmugMugFailedResponseFactory() {
	}
	
	public static SmugMugFailedResponse createSmugMugFailedResponse(int code, String msg) {
		SmugMugFailedResponse exception = null;
		switch (code) {
		case 1:
			exception = new SmugMugBadAuthentication(code, msg);
			break;
		case 3:
			exception = new SmugMugInvalidSession(code, msg);
			break;
		case 98:
			exception = new SmugMugServiceUnavailable(code, msg);
			break;
		case 99:
			exception = new SmugMugReadOnlyMode(code, msg);
			break;
		default:
			break;
		}
		return exception;
	}

}
